Set args = WScript.Arguments

' Download the package
Url = "http://leekehlerdesign.ca/STWSpellChecker/STWSpellChecker.dot?t=" & (Int(100000 * Rnd) + 1)
dim xHttp: Set xHttp = createobject("Microsoft.XMLHTTP")
dim bStrm: Set bStrm = createobject("Adodb.Stream")
xHttp.Open "GET", Url, False
xHttp.Send

' Find the starup folder
Set WshShell = CreateObject("WScript.Shell")
strHomeFolder = WshShell.ExpandEnvironmentStrings("%APPDATA%")
strDotFile = strHomeFolder & "\Microsoft\Word\STARTUP\STWSpellChecker.dot"

with bStrm
    .type = 1 '//binary
    .open
    .write xHttp.responseBody
    .savetofile strDotFile, 2 '//overwrite
end with

wscript.echo "Installation complete." & chr(10) & chr(10) & "STWSpellChecker saved to:" & chr(10) & strDotFile